﻿angular.module('app')
    .directive("downloadFileDashboard", function () {
        return {
            scope: {
                property: '='
            },
            restrict: 'E',
            replace: true,
            controller: ['$scope', function ($scope) {
                $scope.saveFile = function (property) {
                    window.open('api/docs/' + property.value);
                };
            }],
            template: '<b class="pull-left col-sm-6 btnsavefile" ng-click="saveFile(property)"><i class="fa fa-file"></i> {{property.value}}</b>'
        };
    });